home *** CD-ROM | disk | FTP | other *** search
- function loadImage(num)
- {
- imgPath = myImgList[num - 1];
- mcl.loadClip(imgPath,bitmapLoader);
- }
- function setImageList(imgList)
- {
- trace("Set Image List " + imgList);
- trace(imgList);
- myImgList = imgList;
- loadImage(1);
- setImageButtonClicked(1);
- i = 0;
- while(i < numberButtons.length)
- {
- numberButtons[i]._visible = false;
- i++;
- }
- if(imgList.length > 1)
- {
- i = 0;
- while(i < imgList.length)
- {
- numberButtons[i]._visible = true;
- i++;
- }
- }
- }
- function getImageList()
- {
- return myImgList;
- }
- function setImageButtonClicked(num)
- {
- i = 0;
- while(i < numberButtons.length)
- {
- numberButtons[i].gotoAndStop(1);
- i++;
- }
- numberButtons[num - 1].gotoAndStop(2);
- selectedImageNumber = num - 1;
- }
- function getSelectedImageNumber()
- {
- return selectedImageNumber;
- }
- stop();
- var ow = 320;
- var oh = 240;
- var numberButtons = Array(num1,num2,num3,num4,num5,num6,num7,num8,num9,num10,num11,num12);
- var selectedImageNumber = 0;
- var myImageList = new Array();
- var mclListener = new Object();
- mclListener.onLoadComplete = function(target_mc)
- {
- target_mc.forceSmoothing = true;
- };
- mclListener.onLoadInit = function(target_mc)
- {
- trace(target_mc._width);
- if(target_mc._width > target_mc._height)
- {
- ratio = ow / target_mc._width;
- off = (oh - target_mc._height * ratio) / 2;
- target_mc._y = off;
- target_mc._height *= ratio;
- target_mc._width *= ratio;
- }
- else
- {
- ratio = oh / target_mc._height;
- off = (ow - target_mc._width * ratio) / 2;
- target_mc._x = off;
- target_mc._height *= ratio;
- target_mc._width *= ratio;
- }
- };
- var mcl = new MovieClipLoader();
- mcl.addListener(mclListener);
-